﻿// -----------------------------------------------------------------------
//  <copyright file="IOnlineUserProvider.cs" company="LiuliuSoft">
//      Copyright (c) 2025 66SOFT. All rights reserved.
//  </copyright>
//  <site>https://ifs.66soft.net</site>
//  <last-editor>郭明锋</last-editor>
//  <last-date>2025-09-27 14:09</last-date>
// -----------------------------------------------------------------------

namespace DaprPlus.Identity;

/// <summary>
/// 获取在线用户信息的提供者
/// </summary>
public interface IOnlineUserProvider
{
    /// <summary>
    /// 获取当前在线用户信息
    /// </summary>
    /// <returns></returns>
    Task<OnlineUser?> GetAsync();

    /// <summary>
    /// 移除在线用户缓存，不指定用户名则移除当前用户缓存
    /// </summary>
    /// <param name="userName"></param>
    /// <returns></returns>
    Task RemoveAsync(string? userName = null);
}